package arrays;



public class RevArray {
	private int a []= {1,2,3,4,5,6};
	
	public void reverse()
	{System.out.println("original Array is (1,2,3,4,5,6}");
	System.out.print("Reverse is ");
		for(int i=1; i<=a.length;i++)
	
		{int j= a.length-i;
		if (i==1)
	{
			System.out.print("{"+a[j]+",");
			continue;
	}
			if (j>0)
			System.out.print(a[j]+",");
		
		    else
	        System.out.print(a[j]+"}");
		
		
		}
	}
		
	
	
		
		public static void main(String[] args) {
		//Scanner input;
	
		RevArray r= new RevArray();
		r.reverse();

	}

}



